#pragma once

#include <IwGeomFVec2.h>
#include "Sprite.h"

class Ship;

#define MAX_NUM_POINTS 15

class PolylineCollisionObject {
public:
	void Load( const CIwFVec2& pos, const char* image );
	void Unload();
	
	void AddPoint( CIwFVec2 point );
	
	bool CheckCollisionWithShip( const Ship &ship, CIwFVec2 *normal );
	
	void Draw( );
	
	const CIwFVec2* GetCollisionPoints() const;
	int GetNumCollisionPoints() const;
		
	CIwFVec2 GetPos() const;
	
	float GetWidth() const;
	float GetHeight() const;
		
private:
	CIwFVec2 m_points[MAX_NUM_POINTS];
	CIwFVec2 m_pos;
	Sprite m_sprite;
	int m_num_points;
};